// 时间格式化工具
// console.log(new Date().getTime());
export default function formate(time, formate="yy-MM-dd hh:mm:ss") {
    // console.log(time);
    let date = new Date(time*1000)
    let year = date.getFullYear()
    let month = date.getMonth() + 1
    let day = date.getDate()
    let h = date.getHours()
    h = h < 10 ? '0' + h : h
    let m = date.getMinutes()
    m = m < 10 ? '0' + m : m
    let s = date.getSeconds()
    s = s < 10 ? '0' + s : s
    if(formate = "yy-MM-dd hh:mm:ss") {
        return `${year}-${month}-${day} ${h}:${m}:${s}`
    }
    
}